package com.king.designpatterns.结构型模式.享元模式;

/**
 * 棋子具体享元
 *
 * @author king
 * @date 2021-06-08 14:32
 */
public class ChesspieceFlyweight implements Chesspiece{
    private String color;

    public ChesspieceFlyweight(String color) {
        this.color = color;
    }

    @Override
    public void put(int x, int y) {
        System.out.println("在（" + x + ", " + y + "）位置放了一个" + color + "子");
    }
}
